Stochastic Differential Equations - Lecture 2

Kostas Zygalakis

Reminders

A stochastic integral is

$$ \begin{equation} \int_{t_0}^t G(t') \, dW(t') = \text{mean-square-}\lim_{n\to\infty} \left\{ \sum_{i=1}^n G(t_{i-1}) \left( W_{t_i} - W_{t_{i-1}} \right) \right\} \end{equation} $$

where $W$ (sometimes denoted $B$) is a Wiener process or Brownian motion or Brownian path.

The numerical solution of SDEs is given by

$$ \begin{equation} dX_t = f(X_t) \, dt + g(X_t) \, dW_t. \end{equation} $$

This is not the same as

$$ \begin{equation} \frac{d X_t}{dt} = f(X_t) + g(X_t) \frac{d W_t}{dt} \end{equation} $$

as the path itself is not differentiable. Instead it should be interpreted as the integral equation

$$ \begin{equation} X_t = X_0 + \int_0^t f(X(s)) \, ds + \int_0^t g(X(s)) \, dW_s. \end{equation} $$

Doing this discretely we have

$$ \begin{align} X((t+1)h) - X(th) & = X_0 + \int_0^{(t+1)h)} f(X(s)) \, ds + \int_0^{(t+1)h} g(X(s)) \, dW_s - X_0 - \int_0^{th} f(X(s)) \, ds - \int_0^{th} g(X(s)) \, dW_s \\ & = \int_{th}^{(t+1)h)} f(X(s)) \, ds + \int_{th}^{(t+1)h} g(X(s)) \, dW_s \\ & \simeq f(X(th)) \left[ (t+1)h - th \right] + g(X(th)) \left[ W \left( (t+1) h \right) - W(th) \right] \\ & \simeq f(X(th)) h + g(X(th)) \xi_n. \end{align} $$

So the algorithm becomes

$$ \begin{equation} X_{n+1} - X_n = f(X_n) h + g(X_n) \xi_n \end{equation} $$

where $\xi_n$ is a random variable with

  1. zero mean,
  2. normally distributed,
  3. varaiance $(t+1)h - th = h$.

This is often rewritten as (the Euler-Maruyama method)

$$ \begin{equation} X_{n+1} - X_n = f(X_n) h + \sqrt{h} g(X_n) \hat{\xi}_n, \qquad \hat{\xi}_n \sim N(0, 1). \end{equation} $$

The random variable $\hat{\xi}_n$ is therefore the standard normally distributed variable with mean zero and variance (or standard deviation) one.

Accuracy and convergence

Consider the simple ODE

$$ \begin{equation} \frac{dX}{dt} = f(X(t)). \end{equation} $$

Given the simple Euler method

$$ \begin{equation} X_{n+1} = X_n + h f(X_n) \end{equation} $$

we have that the error (given the true solution $X^{(e)}(T)$ and the numerical solution $X^{(h)}(T)$ with step size $h$ at identical times $T$) is

$$ \begin{equation} | X^{(e)}(T) - X^{(h)}(T) | \le C(T) h^{\alpha} \end{equation} $$

where $\alpha = 1$.

NOTE: picture here looking at the difference between the exact integral and the "Euler" integral over the range of $h$.

Argument for the convergence result:

$$ \begin{align} && \frac{d f(X(t))}{dt} & = \frac{df}{dX} \frac{dX}{dt} \\ \implies && \frac{df}{dt} & = f'(X(t))f(X(t)) \\ \implies && f(X(t)) = f(X(0)) + \int_0^t f'(X(s)) f(X(s)) \, ds. \end{align} $$

Hence we have

$$ \begin{align} \int_0^h f(X(s)) \, ds & = \int_0^h \left[ f(X(0)) + \left( \int_0^s f'(X(l))f(X(l)) \right) \, dl \right] \, ds \\ & = h f(X(0)) + \int_0^h \left( \int_0^s f'(X(l)) f(X(l)) \, dl \right) \, ds \end{align} $$

Extending the analysis to SDEs

Version 1

$$ \begin{equation} X_{n+1} = X_n + h f(X_n) + g(X_n) \Delta W_n \end{equation} $$

Version 2

$$ \begin{equation} X_{n+1} = X_n + h f(X_n) + \sqrt{h} g(X_n) \xi_n, \qquad \xi_n \sim N(0, 1). \end{equation} $$

Measuring the errors is more difficult as we have a random variable, so each run will give different results. Instead we must average.

Strong convergence

In this case we measure

$$ \begin{equation} \mathbb{E} | X^{(e)}(T) - X^{(h)}(T) | \le C h^{\gamma}. \end{equation} $$

This is the mean error. This means that we are assuming an underlying random process, or a fixed Brownian process, which is approximated by $\xi_n$ or by $\Delta W_n$. As we vary the step size $h$ we keep the same underlying Brownian path, just evaluate it differently (effectively integrating over segments of different lengths).

The expectation here is that the convergence rate for Euler-Maruyama here is $\gamma = 1/2$, thanks to the $\sqrt{h}$ factor in the random process. This "intuitively" follows from thinking about generalizing the above analysis to the stochastic case, looking at the extra terms in the process, and can easily be checked numerically.

Weak convergence

In this case we measure

$$ \begin{equation} \left| \mathbb{E} (p(X^{(e)}(T)) - \mathbb{E} (p(X^{(h)}(T)) \right| \le C h^{\gamma}. \end{equation} $$

Here $p$ is some function of the solution. This is the error of the means. For Euler-Maruyama the result is that $\gamma = 1$.

If you consider $p(X) = X$ we can compare the weak convergence test

$$ \begin{equation} \left| \mathbb{E} (X^{(e)}(T)) - \mathbb{E} (X^{(h)}(T)) \right| \end{equation} $$

with the strong

$$ \begin{equation} \mathbb{E} \left| X^{(e)}(T) - X^{(h)}(T) \right| . \end{equation} $$

By considering two Gaussian random processes we can see that strong convergence implies weak convergence, but not the other way around (two processes with identical mean need not have the same realization).

Stochastic chain rule

Without proof:

$$ \begin{equation} dW^2 = dt, \qquad dW^{2+N} = 0, \quad \text{for } N > 0. \end{equation} $$

Deterministic chain rule

$$ \begin{equation} \frac{dX}{dt} = f(X). \end{equation} $$

Hence

$$ \begin{align} \frac{d}{dt} V(X_t) & \simeq V(X(t) + dX(t)) - V(X(t)) \\ & \simeq V(X(t)) + V'(X(t)) \, dX(t) + \frac{1}{2} V''(X(t)) \, (dX(t))^2 - V(x(t)) \\ & \simeq V'(X(t)) \, dX(t) + \frac{1}{2} V''(X(t)) \, (dX(t))^2 \\ & \simeq V'(X) f(X)\, dt + \underbrace{\frac{1}{2} V''(X) f^2(X) \, dt^2}_{\text{small}} \\ \frac{dV}{dt} & = V'(X) f(X). \end{align} $$

Stochastic case

$$ \begin{align} dV(x) & = V(X(t) + dX(t)) - V(X(t)) \\ & \simeq V'(X) \, dX + \frac{1}{2} V''(X) \, (dX)^2 \\ & \simeq V'(X) \left[ f(X)\,dt + g(X)\,dW_t \right] + \frac{1}{2} V''(X) \left[ f(X)\,dt + g(X)\,dW_t \right]^2 \\ & \simeq V'(X) \left[ f(X)\,dt + g(X)\,dW_t \right] + \frac{1}{2} V''(X) \left[ f(X)^2\,dt^2 + f(X) g(X)\,dt dW_t + g^2\,dW^2_t \right] \\ & \simeq \left[ V' f + \frac{1}{2} V'' g^2 \right] \, dt + V' g \, dW_t + \text{higher order terms}. \end{align} $$

We see that we expect additional terms resulting from the Brownian path.

Application

Remember the stochastic integral

$$ \begin{equation} \int_{t_0}^t W_s \, dW_s = \frac{1}{2} W_t^2 - \frac{1}{2} W_{t_{0}}^2 - \frac{1}{2} (t - t_0). \end{equation} $$

If we choose $V = X^2$ for the equation $dX_t = dW_t$ with $f = 0$ and $g = 1$ then we get

$$ \begin{align} && dX_t^2 & = dt + 2 X_t \, dW_t. \\ \implies && X_t^2 & = X_{t_0}^2 + \int_{t_0}^t ds + \int_{t_0}^t 2 X_s \, dW_s \\ \implies && W_t^2 & = W_{t_0}^2 + (t - t_0) + 2 \int_{t_0}^t W_s \, dW_s. \end{align} $$

Exercise

Use the stochastic chain rule to prove that

$$ \begin{equation} dX_t = \lambda X_t \, dt + \mu X_t \, dW_t \end{equation} $$

has a solution of the form

$$ \begin{equation} X_t = X_0 \exp \left[ (\lambda - \tfrac{1}{2} \mu) t + \mu W_t \right]. \end{equation} $$

Hint: apply the chain rule to $V(x) = \log(x)$.